package com.rainliang.project.user.basic.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.rainliang.project.util.DateUtil;



public class UserBean implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;
	private String login_name="";
	private String user_password="";
	private String login_email="";
	private String user_sign="";
	private String imgSrc="";
	private String desc="";
	private String user_tag="";
	private String regDate="";
	private String lastLoginDate;
	private String nickName;

	public static UserBean parseMap(Map<String, Object> map) {
		UserBean ub = null;
		try {
			if (map != null && map.size() > 0) {
				ub = new UserBean();
				ub.setId((Long) map.get("id"));
				ub.setLogin_name((String) map.get("login_name"));
				ub.setUser_password((String) map.get("user_password"));
				ub.setLogin_email((String) map.get("login_email"));
				ub.setUser_sign((String) map.get("user_sign"));
				ub.setImgSrc((String) map.get("imgSrc"));
				ub.setDesc((String) map.get("udesc"));
				ub.setUser_tag((String) map.get("user_tag"));
				ub.setRegDate((String) map.get("regDate"));
				ub.setLastLoginDate(DateUtil.getFormatDate((Date) map.get("lastLoginDate")));
				ub.setNickName((String) map.get("nick_name"));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return ub;
	}

	private List<Long> games;
	private List<Long> roles;
	private List<Long> friends;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getLogin_name() {
		return login_name;
	}

	public void setLogin_name(String login_name) {
		this.login_name = login_name;
	}

	public String getUser_password() {
		return user_password;
	}

	public void setUser_password(String user_password) {
		this.user_password = user_password;
	}

	public String getLogin_email() {
		return login_email;
	}

	public void setLogin_email(String login_email) {
		this.login_email = login_email;
	}

	public String getImgSrc() {
		return imgSrc;
	}

	public void setImgSrc(String imgSrc) {
		this.imgSrc = imgSrc;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	

	public String getUser_sign() {
		return user_sign;
	}

	public void setUser_sign(String userSign) {
		user_sign = userSign;
	}

	public String getUser_tag() {
		return user_tag;
	}

	public void setUser_tag(String userTag) {
		user_tag = userTag;
	}

	public List<Long> getGames() {
		return games;
	}

	public void setGames(List<Long> games) {
		this.games = games;
	}

	public List<Long> getFriends() {
		return friends;
	}

	public void setFriends(List<Long> friends) {
		this.friends = friends;
	}

	public List<Long> getRoles() {
		return roles;
	}

	public void setRoles(List<Long> roles) {
		this.roles = roles;
	}

	public String getRegDate() {
		return regDate;
	}

	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}

	public String getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(String lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

}
